#!/bin/bash 

i=0
sum=0
for((i=0;i<=100;i++))
do 
  sum=$[ $i + $sum ]
done

echo "$sum"

for i in $@
do 
  echo "$i"
done 

t=1
while [ $sum -ge 0 ]
do 
  echo "$sum"
  sum=$[ $sum - $t ]
  t=$[ $t + 1 ]
done  
